package com.ruoyi.pcj.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsJoinTable;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.pcj.constant.TbConstant;
import lombok.Data;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 帖子话题对象 pcj_tb_subject
 *
 * @author ms
 * @date 2024-03-09
 */
@Data
@TableName("pcj_tb_subject")
public class PcjTbSubject extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId
    @TableField("id")
    private String id;


    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    @TableField("del_flag")
    private Integer delFlag;


    /**
     * 话题名称
     */
    @TableField("name")
    private String name;


    /**
     * 创建话题用户id
     */
    @MsJoinTable(joinTable = TbConstant.sysUser, joinField = "user_id", needFields = {"user_name@userName"})
    @TableField("user_id")
    private Long userId;
    /**
     * 创建话题用户名称
     */
    @TableField(exist = false)
    private String userName;


    /**
     * 话题被使用的次数-筛选热门话题
     */
    @TableField("use_num")
    private Integer useNum;


    /**
     * 一级板块id
     */
    @MsJoinTable(joinTable = TbConstant.pcjPlate, needFields = {"name@plateName"})
    @TableField("plate_id")
    private String plateId;
    /**
     * 一级板块名称
     */
    @TableField(exist = false)
    private String plateName;


    /**
     * 二级板块id
     */
    @MsJoinTable(joinTable = TbConstant.pcjPlatePat, needFields = {"name@partitionName"})
    @TableField("plate_partion_id")
    private String platePartionId;
    /**
     * 二级板块分区名称
     */
    @TableField(exist = false)
    private String partitionName;


}
